package com.hxd.otc.other;

import android.animation.ObjectAnimator;
import android.view.View;

import com.flyco.animation.BaseAnimatorSet;

/**
 * 作  者 :  卫广玉
 * 时  间 :  2018/6/6 19:04
 * 描  述 :  一些动画
 */
public class CustomBounceTopEnter extends BaseAnimatorSet {
    public CustomBounceTopEnter() {
        duration = 10;
    }

    //    @Override
//    public void setAnimation(View view) {
//        DisplayMetrics dm = view.getContext().getResources().getDisplayMetrics();
//        animatorSet.playTogether(ObjectAnimator.ofFloat(view, "alpha", 0, 1),//
//                ObjectAnimator.ofFloat(view, "translationY", -250 * dm.density,  0));
//    }
    @Override
    public void setAnimation(View view) {
        animatorSet.playTogether(//
                ObjectAnimator.ofFloat(view, "alpha", 0, 1).setDuration(duration));
    }
}
